package com.kxf.pushkeepalive.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import com.kxf.pushkeepalive.R;

public class AccbActivity extends AppCompatActivity {

    Button btnReturn;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_accb);

        final PendingIntent intentPending = getIntent().getParcelableExtra("extraPendingIntent");
        btnReturn = findViewById(R.id.btnReturn);
        btnReturn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.d("AccbActivity", "btnReturn===>>>");
                try {
                    Intent intent = new Intent();
                    intent.putExtra("nameKxf", "tom888");
                    intent.putExtra("name1", "tom111");
                    intentPending.send(AccbActivity.this, 100, intent);
//                    startIntentSender(intentPending.getIntentSender(), new Intent(), 0, 0, 0);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }
}
